<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var a = 10;
			var obj = {
			  a: 20
			}
			
			function fn() {
			  this = obj; // 修改this，运行后会报错
			  console.log(this.a);
			}
			
			fn();
		</script>
	</body>
</html>
